////////////////////////////////////////////////////////////////////////
//
// BEGIN_COPYRIGHT
// Confidential property of Faxsun.
//
// Copyright 2014-
//
// Faxsun. All rights reserved.
//
// Unpublished rights reserved under Chinese copyright laws.
// END_COPYRIGHT
//
// BEGIN_DISCLAIMER
// This software contains confidential and trade secret information of 
// Faxsun. Use, duplication or disclosure of the software and 
// documentation by any individual, organization or government must be 
// granted written agreement from Faxsun.
//
// Faxsun. Shanghai China
// END_DISCLAIMER
//
////////////////////////////////////////////////////////////////////////

package com.faxsun.core.pojos;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;



/**
 * 请求设备类型，主要用于后续数据分析.类似KVmap
 * 
 * @author lei.ma
 *
 */
public class DeviceId {
    public static final String DEVICE_TYPE="DEVICE-TYPE";
    public static final String IP="IP";
    
    private JSONObject jsono;
    
    public DeviceId(){
        jsono = new JSONObject();
    }
    
    public DeviceId(String json){
        jsono = JSON.parseObject(json); 
    }
    
    public void addValue(String key, String val){
        jsono.put(key, val);
    }
    
    public String getValue(String key){
        return (String) jsono.get(key);
    }

    @Override
    public String toString(){
        return jsono.toJSONString();
    }
    
}
